import { withInstall } from '@ibiz-template/vue3-util';
import { App } from 'vue';
import { registerPanelItemProvider } from '@ibiz-template/runtime';
import { AvatarCollapseBtn } from './avatar-collapse-btn';
import { AvatarCollapseBtnProvider } from './provider';

export const IBizAvatarCollapseBtn = withInstall(
  AvatarCollapseBtn,
  function (v: App) {
    v.component(AvatarCollapseBtn.name, AvatarCollapseBtn);
    registerPanelItemProvider(
      'CUSTOM_AVATAR_COLLAPSE_BTN',
      () => new AvatarCollapseBtnProvider(),
    );
  },
);
